﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LULSMS
{
    public partial class UserConnection
    {

        private static void createConnection(string username, string ip)
        {
            using (LULSMSEntitiesEntities entity = new LULSMSEntitiesEntities())
            {
                UserConnection user_conn = new UserConnection();
                user_conn.UserID = entity.aspnet_Users.FirstOrDefault(i => i.UserName);
                user_conn.IP = ip;
                user_conn.StartDate = DateTime.Today;
                user_conn.EndDate = null;
                entity.SaveChanges();
            }


        } 
        
    }
}
